package es.cazadoresmadridejos.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity(name="Task")
@Table(name="tarea")
public class Task extends BaseEntity{

	public enum TaskStatus {
		FINALIZADO
	}
	public enum TaskType {
		apuntarse_corzo,renuncia_macho_perdiz,apuntarse_monterias, renuncia_monterias
	}
	
	private Partner partner;
	private String description;
	private TaskStatus status;
	private TaskType type;
	
	@ManyToOne(optional=false)
	@JoinColumn(name="usuario")			
	public Partner getPartner() {
		return partner;
	}
	public void setPartner(Partner partner) {
		this.partner = partner;
	}
	@Column(name="descripcion")
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@Column(name="estado")
	@Enumerated(EnumType.STRING)
	public TaskStatus getStatus() {
		return status;
	}
	public void setStatus(TaskStatus status) {
		this.status = status;
	}
	@Column(name="tipo")
	@Enumerated(EnumType.STRING)
	public TaskType getType() {
		return type;
	}
	public void setType(TaskType type) {
		this.type = type;
	}
}
